<template>
  <div v-if="loading" class="user-space">
    <space-header :userinfo="userinfo" />
  </div>
</template>

<script setup>
import { ref } from 'vue'
import { useRoute, useRouter } from 'vue-router'
import { getUserInfoDigest } from '/src/api/user'
import SpaceHeader from './SpaceHeader.vue'
import { ElNotification } from 'element-plus'
import { useUserStore } from '../../store/user'
import { processWx } from '../../hooks/emotion/useEmotions'

const route = useRoute()
const router = useRouter()
const user = useUserStore()
const uid = Number(route.params.uid) || user.uid
const loading = ref(false)
const userinfo = ref(null)
const tweetList = ref(null)
const inputText = ref('')
const isSelf = uid === user.uid

getUserInfoDigest(uid).then((res) => {
  userinfo.value = res.result.records[0]
  loading.value = true
})

</script>

<style lang="scss" scoped>
.user-space {
  max-width: 1000px;
  min-height: 800px;
  margin: -8px auto 8px;
  overflow: hidden;

  border-radius: 2px;
}


</style>
